import React from "react";
import "./index.css";

export default class MsgNumber extends React.Component{
    constructor(props)
    {
        super();
        this.state={
            title:props.title,
            number:props.number
        };
    }
    componentWillReceiveProps(){
        this.setState({
            title:this.props.title,
            number:this.props.number
        });
    }
    render(){
        return(
            <span>
                <span className="MsgNumber_Title">{this.state.title}</span>
                <span className="MsgNumber_Number">{this.state.number}</span>
            </span>
        )
    }
}